home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / util / dtype / cdt_39_10.lha / cdt / Install < prev    next >
Text File  |  1995-04-01  |  3KB  |  144 lines

  1. ;
  2. ; $PROJECT: c.datatype
  3. ;
  4. ; $VER: Install 39.1 (12.03.95)
  5. ;
  6. ; by
  7. ;
  8. ; Stefan Ruppert , Windthorststraße 5 , 65439 Flörsheim , GERMANY
  9. ;
  10. ; (C) Copyright 1995
  11. ; All Rights Reserved !
  12. ;
  13. ; $HISTORY:
  14. ;
  15. ; 12.03.95 : 039.001 : initial
  16. ;
  17.  
  18. (set cpu (database "cpu"))
  19.  
  20. (set #datatype "c.datatype")
  21. (set #datatype-desc (cat "C(%|++)-Source"))
  22.  
  23. (set mode
  24.       (askchoice
  25.             (prompt @app-name)
  26.             (help @askchoice-help)
  27.             (choices "Install" "Remove")
  28.       )
  29. )
  30.  
  31. (if mode
  32.           (set pmode "Remove")
  33.           (set pmode "Install")
  34. )
  35.  
  36. ; get classes dir
  37. (set classdir
  38.           (askdir
  39.                      (prompt "Where do the Classes belong")
  40.                      (help @askdir-help)
  41.                      (default "SYS:Classes")
  42.           )
  43. )
  44.  
  45. ; now do install or remove
  46. (if mode
  47.           ; Remove
  48.           (
  49.                      ; Show what we are doing
  50.                      (working "Removing " @app-name)
  51.  
  52.                      ; Remove the non-standard pieces
  53.                      (delete (tackon classdir "datatypes" #datatype))
  54.                      (delete (cat "devs:datatypes/" #datatype-desc) (infos))
  55.  
  56.                      ; Don't want to use the confusing "Installation Complete" message
  57.                      ; when what we really did was remove things...
  58.                      (message "The \"" @app-name "\" components "
  59.                                  "that you specified have been successfully removed")
  60.                      (exit (quiet))
  61.           )
  62.  
  63.           ; Install
  64.           (
  65.                      (working "Installing " @app-name)
  66.  
  67.                      (set #dtname (tackon "classes/datatypes" #datatype))
  68.  
  69.                      ; Install the classes
  70.                      (if (OR (= cpu "68000") (= cpu "68010"))
  71.                           (run (cat "copy >NIL: " #dtname ".000 t:" #datatype))
  72.                           (run (cat "copy >NIL: " #dtname ".020 T:" #datatype))
  73.                      )
  74.  
  75.                      ; Install the classes
  76.                      (copylib
  77.                                 (prompt (cat "Copying " @app-name))
  78.                                 (help @copylib-help)
  79.                                 (source (tackon "t:" #datatype))
  80.                                 (dest (tackon classdir "DataTypes"))
  81.                                 (confirm)
  82.                      )
  83.  
  84.                      (run (cat "delete >NIL: t:" #datatype))
  85.  
  86.                      ; Install the descriptors
  87.                      (copyfiles
  88.                                 (prompt "Copying the Descriptors")
  89.                                 (help @copyfiles-help)
  90.                                 (source "devs/datatypes")
  91.                                 (dest "DEVS:DataTypes")
  92.                                 (pattern "#?")
  93.                                 (infos)
  94.                                 (confirm)
  95.                      )
  96.  
  97.                      ; Install prefs file
  98.                      (if     (askbool
  99.                                           (prompt "Install Prefs file ?")
  100.                                           (help @askbool-help)
  101.                                 )
  102.                                 (
  103.                                           (copyfiles
  104.                                                      (help @copyfiles-help)
  105.                                                      (source "envarc/datatypes/c.prefs")
  106.                                                      (dest "EnvArc:DataTypes")
  107.                                           )
  108.                                           (copyfiles
  109.                                                      (help @copyfiles-help)
  110.                                                      (source "envarc/datatypes/c.prefs")
  111.                                                      (dest "Env:DataTypes")
  112.                                           )
  113.                                 )
  114.                      )
  115.  
  116.                      ; install doc file
  117.                      (copyfiles
  118.                                 (prompt "Copying autodoc file")
  119.                                 (help @copyfiles-help)
  120.                                 (source "doc")
  121.                                 (dest "AutoDocs:")
  122.                                 (pattern "#?")
  123.                                 (confirm)
  124.                      )
  125.  
  126.                      ; install AmigaGuide file
  127.                      (copyfiles
  128.                                 (prompt "Copying AmigaGuide file")
  129.                                 (help @copyfiles-help)
  130.                                 (source "help")
  131.                                 (dest "AmigaGuide:")
  132.                                 (pattern "#?")
  133.                                 (confirm)
  134.                      )
  135.  
  136.                      ; Tell the system about the new descriptors
  137.                      (run "C:AddDataTypes Refresh")
  138.  
  139.           )
  140. )
  141.  
  142. (set @default-dest classdir)
  143.  
  144.